package com.aaa.dao;

import com.aaa.entity.Address;
import com.aaa.entity.User;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


import java.util.List;

@Mapper
public interface UserDao extends BaseMapper<User> {
    @Select("select * from user where uid=#{uid}")
    List<User> sel(User user);
    @Update("update user set username=#{username},sex=#{sex},address=#{address},email=#{email},picture=#{sName} where uid=#{uid}")
    int updatePhoto(Integer uid,String username,String sex,String address,String email ,String sName);
    @Insert("insert into user  values (#{uid},#{uname},#{username},#{password},#{sex},#{address},#{createtime},#{phone},#{email},#{rid},#{picture},#{state})")
    int insertUser(Integer uid,String uname, String username, String password, String sex, String address, String createtime,String phone,String email,Integer rid,String picture,Integer state);
}
